package com.llk.rabbitmqlearn.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {
    public static final String FORMAT_PATTERN = "yyyy-MM-dd HH:mm:ss";

    public static String getDateStr(Date date, String pattern) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(FORMAT_PATTERN);
        return simpleDateFormat.format(date);
    }
}
